package com.cy.pj.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class PageController {

/*    @GetMapping("/menu/menu_list")
    public String doMenuUI(){
        return "sys/menu_list";
    }*/

    @GetMapping("/{menu}/{moduleUI}")
    public String doModuleUI(@PathVariable String moduleUI){
        return "sys/"+moduleUI;
    }

    /*返回首页页面*/
    @RequestMapping("/doIndexUI")
    public String doIndexUI(Model model){
        String loginUser="Tony";
        model.addAttribute("username",loginUser);
        return "starter";
    }

    @RequestMapping("/doPageUI")
    public String doPageUI(){
        return "common/page";
    }
}
